<?php

namespace yan\backendclient\modules\menu\models;

use Yii;

/**
 * This is the model class for table "{{%menu_type}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $i18n
 * @property integer $sort_order
 */
class MenuType extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%menu_type}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['sort_order'], 'integer'],
            [['name'], 'string', 'max' => 16],
            [['i18n'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('menu', 'ID'),
            'name' => Yii::t('menu', 'Name'),
            'i18n' => Yii::t('menu', 'I18n'),
            'sort_order' => Yii::t('menu', 'Sort Order'),
        ];
    }
}
